﻿namespace STX.Service.Valid.TabBlackListValid
{
    public class Add: ValidExpression<STX.Domain.TabBlackList>
    {
        public override void ValidEntity(ValidationResult result, Domain.TabBlackList entity)
        {
            NoEmpty(result, "ip address", entity.IpAddress);
            if (entity.StartTime >= entity.EndTime)
            {
                PushError(result, "start time can not the end time");
            }
        }
    }
}
